home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 2010 April
/
PCWorld0410.iso
/
redakcyjne
/
programy
/
FEBE (Firefox Environment Backup Extension) 5.0
/
febe-5.0-fx.xpi
/
chrome
/
febe.jar
/
content
/
febeOptions.js
< prev
next >
Wrap
Text File
|
2007-06-20
|
25KB
|
612 lines
// author: Chuck Baker
// contact: febe@customsoftwareconsult.com
// Version 5.0
window.addEventListener("load",febeBuProfileCheck,true);
function febeBuSelectAll() {
document.getElementById("buExtensions_id").setAttribute("checked",true);
document.getElementById("buThemes_id").setAttribute("checked",true);
document.getElementById("buBookmarks_id").setAttribute("checked",true);
document.getElementById("buPreferences_id").setAttribute("checked",true);
document.getElementById("buCookies_id").setAttribute("checked",true);
document.getElementById("buUserChrome_id").setAttribute("checked",true);
document.getElementById("buUserContent_id").setAttribute("checked",true);
document.getElementById("buUserPwd_id").setAttribute("checked",true);
document.getElementById("buPhishingData_id").setAttribute("checked",true);
document.getElementById("buSearchPlugins_id").setAttribute("checked",true);
document.getElementById("buBrowserHistory_id").setAttribute("checked",true);
document.getElementById("buFormFillHistory_id").setAttribute("checked",true);
document.getElementById("buPermissions_id").setAttribute("checked",true);
document.getElementById("buUDBu_id").setAttribute("checked",true);
febePrefs.setBoolPref("extensions.febe.buExtensions",true);
febePrefs.setBoolPref("extensions.febe.buThemes",true);
febePrefs.setBoolPref("extensions.febe.buBookmarks",true);
febePrefs.setBoolPref("extensions.febe.buPreferences",true);
febePrefs.setBoolPref("extensions.febe.buCookies",true);
febePrefs.setBoolPref("extensions.febe.buUserChrome",true);
febePrefs.setBoolPref("extensions.febe.buUserContent",true);
febePrefs.setBoolPref("extensions.febe.buUserPwd",true);
febePrefs.setBoolPref("extensions.febe.buPhishingData",true);
febePrefs.setBoolPref("extensions.febe.buSearchPlugins",true);
febePrefs.setBoolPref("extensions.febe.buBrowserHistory",true);
febePrefs.setBoolPref("extensions.febe.buFormFillHistory",true);
febePrefs.setBoolPref("extensions.febe.buPermissions",true);
febePrefs.setBoolPref("extensions.febe.buUDBu",true);
return true;
}//febeBuSelectAll()
function febeBuDeSelectAll(){
document.getElementById("buExtensions_id").setAttribute("checked",false);
document.getElementById("buThemes_id").setAttribute("checked",false);
document.getElementById("buBookmarks_id").setAttribute("checked",false);
document.getElementById("buPreferences_id").setAttribute("checked",false);
document.getElementById("buCookies_id").setAttribute("checked",false);
document.getElementById("buUserChrome_id").setAttribute("checked",false);
document.getElementById("buUserContent_id").setAttribute("checked",false);
document.getElementById("buUserPwd_id").setAttribute("checked",false);
document.getElementById("buPhishingData_id").setAttribute("checked",false);
document.getElementById("buSearchPlugins_id").setAttribute("checked",false);
document.getElementById("buBrowserHistory_id").setAttribute("checked",false);
document.getElementById("buFormFillHistory_id").setAttribute("checked",false);
document.getElementById("buPermissions_id").setAttribute("checked",false);
document.getElementById("buUDBu_id").setAttribute("checked",false);
febePrefs.setBoolPref("extensions.febe.buExtensions",false);
febePrefs.setBoolPref("extensions.febe.buThemes",false);
febePrefs.setBoolPref("extensions.febe.buBookmarks",false);
febePrefs.setBoolPref("extensions.febe.buPreferences",false);
febePrefs.setBoolPref("extensions.febe.buCookies",false);
febePrefs.setBoolPref("extensions.febe.buUserChrome",false);
febePrefs.setBoolPref("extensions.febe.buUserContent",false);
febePrefs.setBoolPref("extensions.febe.buUserPwd",false);
febePrefs.setBoolPref("extensions.febe.buPhishingData",false);
febePrefs.setBoolPref("extensions.febe.buSearchPlugins",false);
febePrefs.setBoolPref("extensions.febe.buBrowserHistory",false);
febePrefs.setBoolPref("extensions.febe.buFormFillHistory",false);
febePrefs.setBoolPref("extensions.febe.buPermissions",false);
febePrefs.setBoolPref("extensions.febe.buUDBu",false);
return true;
}//febeBuDeselectAll()
function febeBuProfileCheck(){
febeSetMsgs();
// Disable options if profile backup is checked
var prefName = "extensions.febe.buType";
if(!febePrefs.prefHasUserValue(prefName)){
febePrefs.setCharPref(prefName,"selective");
}//if
var buType = febePrefs.getCharPref(prefName);
if(buType == "profile"){
document.getElementById("buExtensions_id").setAttribute("disabled",true);
document.getElementById("buThemes_id").setAttribute("disabled",true);
document.getElementById("buBookmarks_id").setAttribute("disabled",true);
document.getElementById("buPreferences_id").setAttribute("disabled",true);
document.getElementById("buCookies_id").setAttribute("disabled",true);
document.getElementById("buUserChrome_id").setAttribute("disabled",true);
document.getElementById("buUserContent_id").setAttribute("disabled",true);
document.getElementById("buUserPwd_id").setAttribute("disabled",true);
document.getElementById("buPhishingData_id").setAttribute("disabled",true);
document.getElementById("buSearchPlugins_id").setAttribute("disabled",true);
document.getElementById("buBrowserHistory_id").setAttribute("disabled",true);
document.getElementById("buFormFillHistory_id").setAttribute("disabled",true);
document.getElementById("buPermissions_id").setAttribute("disabled",true);
document.getElementById("buUDBu_id").setAttribute("disabled",true);
document.getElementById("buSelectAll").setAttribute("disabled",true);
document.getElementById("buDeselectAll").setAttribute("disabled",true);
} else {
document.getElementById("buExtensions_id").setAttribute("disabled",false);
document.getElementById("buThemes_id").setAttribute("disabled",false);
document.getElementById("buBookmarks_id").setAttribute("disabled",false);
document.getElementById("buPreferences_id").setAttribute("disabled",false);
document.getElementById("buCookies_id").setAttribute("disabled",false);
document.getElementById("buUserChrome_id").setAttribute("disabled",false);
document.getElementById("buUserContent_id").setAttribute("disabled",false);
document.getElementById("buUserPwd_id").setAttribute("disabled",false);
document.getElementById("buPhishingData_id").setAttribute("disabled",false);
document.getElementById("buSearchPlugins_id").setAttribute("disabled",false);
document.getElementById("buBrowserHistory_id").setAttribute("disabled",false);
document.getElementById("buFormFillHistory_id").setAttribute("disabled",false);
document.getElementById("buPermissions_id").setAttribute("disabled",false);
document.getElementById("buUDBu_id").setAttribute("disabled",false);
document.getElementById("buSelectAll").setAttribute("disabled",false);
document.getElementById("buDeselectAll").setAttribute("disabled",false);
}//if
return true;
}//febeBuProfileCheck()
function febeSelBUDestDir(){
// Select backup destinaton directory
const nsIFilePicker = Components.interfaces.nsIFilePicker;
var fp = Components.classes["@mozilla.org/filepicker;1"]
.createInstance(nsIFilePicker);
fp.init(window, febeMsg[5], nsIFilePicker.modeGetFolder);
fp.appendFilters(nsIFilePicker.filterAll | nsIFilePicker.filterText);
// Set default directory to current backup directory
if(febePrefs.prefHasUserValue("extensions.febe.extBUdir")){
extBUdir = febeGetUnicharPref("extensions.febe.extBUdir");
if(extBUdir != ""){
var dd = Components.classes["@mozilla.org/file/local;1"]
.createInstance(Components.interfaces.nsILocalFile);
dd.initWithPath(extBUdir);
fp.displayDirectory = dd;
}//if
}//if
var rv = fp.show();
if (rv == nsIFilePicker.returnOK){
rv = fp.file;
extBUdir = rv.path;
febeSetUnicharPref("extensions.febe.extBUdir", extBUdir);
document.getElementById("DestDirID").value = extBUdir;
var d = document.getElementById("DestDirID");
d.setAttribute("value",extBUdir);
}//if
febeCheckBuDestDir();
return true;
}//febeSelBUDestDir()
function febePickTmpDir(){
// Select a specified tmp directory
const nsIFilePicker = Components.interfaces.nsIFilePicker;
var fp = Components.classes["@mozilla.org/filepicker;1"]
.createInstance(nsIFilePicker);
fp.init(window, febeMsg[154], nsIFilePicker.modeGetFolder);
fp.appendFilters(nsIFilePicker.filterAll | nsIFilePicker.filterText);
// Set default directory to current specified tmp directory
if(febePrefs.prefHasUserValue("extensions.febe.tmpSpecifyDirectory")){
var td = febeGetUnicharPref("extensions.febe.tmpSpecifyDirectory");
if(td != ""){
var dd = Components.classes["@mozilla.org/file/local;1"]
.createInstance(Components.interfaces.nsILocalFile);
try{
dd.initWithPath(td);
fp.displayDirectory = dd;
} catch(e){;}
}//if
}
var rv = fp.show();
if (rv == nsIFilePicker.returnOK){
rv = fp.file;
rv.append("febe.tmp");
var td = rv.path;
febeSetUnicharPref("extensions.febe.tmpSpecifyDirectory", td);
document.getElementById("febeSpecifyTmpDirLocation").value = td;
var d = document.getElementById("febeSpecifyTmpDirLocation");
d.setAttribute("value",td);
}//if
return true;
}//febePickTmpDir()
function febeTmpDirCheck(){
var tdd = document.getElementById("febeDefaultTmpDirLocation").value;
var prefName = "extensions.febe.tmpDefaultDirectory";
febeSetUnicharPref(prefName,tdd);
var tsd = document.getElementById("febeSpecifyTmpDirLocation").value;
var prefName = "extensions.febe.tmpSpecifyDirectory";
febeSetUnicharPref(prefName,tsd);
var tmpDirType = document.getElementById("febeTmpDirType").value;
switch(tmpDirType){
case "Default": var whichDir = tdd;break;
case "Specified": var whichDir = tsd;break;
default: var whichDir = tdd;break;
}//switch
var prefName = "extensions.febe.tmpDirectory";
var tmpdir = febeGetUnicharPref(prefName,whichDir);
febeTmpDirInfo();
return true;
}//febeTmpDirCheck()
function febeTmpDirInfo(){
febeGetTmpDirectory(false);
var prefName = "extensions.febe.tmpDefaultDirectory";
document.getElementById("febeDefaultTmpDirLocation").value = febeGetUnicharPref(prefName);
var prefName = "extensions.febe.tmpSpecifyDirectory";
document.getElementById("febeSpecifyTmpDirLocation").value = febeGetUnicharPref(prefName);
var febeTmpStatus = "???";
if(!febeTmpDir.exists()){
febeTmpStatus = febeMsg[121]; // Does not exist
document.getElementById("deltmpdirbtn").disabled = true;
document.getElementById("viewtmpdirbtn").disabled = true;
document.getElementById("createtmpdirbtn").disabled = false;
}else{
document.getElementById("deltmpdirbtn").disabled = false;
document.getElementById("viewtmpdirbtn").disabled = false;
document.getElementById("createtmpdirbtn").disabled = true;
var entries = febeTmpDir.directoryEntries;
if(entries.hasMoreElements()){
febeTmpStatus = febeMsg[123]; // Exists with entries
}else{
febeTmpStatus = febeMsg[122]; // Exists, but empty
}//if
}//if
document.getElementById("febeTmpDirStatus").value = febeTmpStatus;
return true;
}//febeTmpDirInfo()
function febeTmpDirOptions(){
// Set the active tmp directory
var type = document.getElementById("febeTmpDirType").value
switch(type){
case "Default":
var prefName = "extensions.febe.tmpDefaultDirectory";
break;
case "Specified":
var prefName = "extensions.febe.tmpSpecifyDirectory";
break;
}//switch
var tmpdir = febeGetUnicharPref(prefName);
var prefName = "extensions.febe.tmpDirectory";
febeSetUnicharPref(prefName,tmpdir);
febeTmpDirInfo();
return true;
}//febeTmpDirOptions()
function febeClearTmpDir(){
// Get febe tmp directory information
febeGetTmpDirectory(false);
febeTmpDir.remove(true);
var isDeleted = new Boolean(false);
isDeleted = !febeTmpDir.exists();
if(isDeleted){
febeAlert(febeMsg[124]);
}else{
febeAlert(febeMsg[125]);
}//if
febeTmpDirInfo();
return true;
}//febeClearTmpDir()
function febeViewTmpDir(){
febeOpenLink("file:///"+febeTmpDir.path);
return true;
}//febeViewTmpDir()
function febeCreateTmpDir(){
febeGetTmpDirectory(true);
febeTmpDirInfo();
febeAlert(febeMsg[130]);
return true;
}//febeCreateTmpDir()
function febeClearPrefs(){
var ok = febeConfirm(febeMsg[126]+"\n"+febeMsg[127]+"\n\n"+febeMsg[128]);
if(!ok){return false;}
try {
var prefCount = {value:0};
var prefService = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService);
var prefBranch = prefService.getBranch(null);
var prefArray = prefBranch.getChildList("extensions.febe." , prefCount);
var nsIPrefBranch = Components.interfaces.nsIPrefBranch;
for (i = 0; i < prefCount.value; i++){
if(prefBranch.prefHasUserValue(prefArray[i])){prefBranch.clearUserPref(prefArray[i]);}
}
prefBranch.deleteBranch("extensions.febe.");
// delete the destination file if it exists
var febeDataFile = Components.classes["@mozilla.org/file/directory_service;1"]
.getService(Components.interfaces.nsIProperties)
.get("ProfD", Components.interfaces.nsIFile);
febeDataFile.append(FEBEDATAFILE);
if(febeDataFile.exists()){febeDataFile.remove(false);}
}catch (e) {
febeAlert(e);
return false;
}
var version = getFebeVersion();
var prefName = "extensions.febe.previousversion";
febePrefs.setCharPref(prefName,version);
febeAlert(febeMsg[129]);
febeRestartFx();
return true;
}//febeClearPrefs()
function febeViewBuDir(){
var febeBuDestDir = document.getElementById("DestDirID").value;
febeOpenLink("file:///"+febeBuDestDir);
return true;
}//febeViewBuDir()
function febeViewInstallDir(){
var febeInstallDir = document.getElementById("febeInstallPath").value;
febeOpenLink("file:///"+febeInstallDir);
return true;
}//febeViewInstallDir()
function febeCheckBuDestDir(){
if(document.getElementById("DestDirID") && document.getElementById("DestDirID").value != ""){
document.getElementById("febeviewbudirbtnID").disabled = false;
}else{
document.getElementById("febeviewbudirbtnID").disabled = true;
}//if
return true;
}//febeCheckBuDestDir()
function febeDisableOpts(){
document.getElementById("clearwarn_id").disabled = !document.getElementById("clearDestDir_id").checked;
document.getElementById("maxBuDirsLabelID").disabled = !document.getElementById("useTimestampedDir_id").checked;
document.getElementById("maxBuDirsID").disabled = !document.getElementById("useTimestampedDir_id").checked;
febePlatform = febeGetPlatform();
if(febePlatform == 1){
document.getElementById("febedisablepermchk").disabled = true;
document.getElementById("febesetpermissionsbtn").disabled = true;
}else{
document.getElementById("febedisablepermchk").disabled = false;
document.getElementById("febesetpermissionsbtn").disabled = false;
}//if
return true;
}//febeDisableOpts()
function febeRunShellInstallDir(){
// Open a shell to the install dir
var file = Components.classes["@mozilla.org/file/local;1"]
.createInstance(Components.interfaces.nsILocalFile);
switch(febePlatform){
case 1:
file.initWithPath("C:");
file.append("windows");
file.append("system32");
file.append("cmd.exe")
var process = Components.classes["@mozilla.org/process/util;1"]
.createInstance(Components.interfaces.nsIProcess);
process.init(file);
var FEBEdir = Components.classes["@mozilla.org/extensions/manager;1"]
.getService(Components.interfaces.nsIExtensionManager)
.getInstallLocation(FEBE_GUID)
.getItemLocation(FEBE_GUID);
var argv = ["/K","cd",FEBEdir.path];
var prefName = "extensions.febe.debugMode";
febeDebugMode = febePrefs.getBoolPref(prefName);
if(febeDebugMode == true){
var style = "<style>font-family: courier; font-size: 8pt;</style>";
var tmp = style+file.path+" /K\n";
tmp += style+"cd "+FEBEdir.path+"\n"
febeAlert(tmp);
}//if
process.run(true, argv, argv.length);
break;
case 2:
file.initWithPath("/");
file.append("bin");
file.append("sh")
var process = Components.classes["@mozilla.org/process/util;1"]
.createInstance(Components.interfaces.nsIProcess);
process.init(file);
var FEBEdir = Components.classes["@mozilla.org/extensions/manager;1"]
.getService(Components.interfaces.nsIExtensionManager)
.getInstallLocation(FEBE_GUID)
.getItemLocation(FEBE_GUID);
var arg = 'cd "'+FEBEdir.path+'";/usr/bin/xterm -e sh';
var argv = ["-c",arg];
process.run(true, argv, argv.length);
break;
case 3:
// Create the tmp file to store the batch file
febeGetTmpDirectory(true);
if(!febeTmpDir.exists()){
febeTmpDir.create(Components.interfaces.nsIFile.DIRECTORY_TYPE, 0777);
}//if
// Get pointer to FEBE install dir
var FEBEdir = Components.classes["@mozilla.org/extensions/manager;1"]
.getService(Components.interfaces.nsIExtensionManager)
.getInstallLocation(FEBE_GUID)
.getItemLocation(FEBE_GUID);
// Create a batch file to launch shell
var febeMacLaunch = febeTmpDir.clone();
febeMacLaunch.append("macinstalldir.sh");
if(febeMacLaunch.exists()){febeMacLaunch.remove(true);}
febeMacLaunch.create(Components.interfaces.nsIFile.NORMAL_FILE_TYPE, 0777);
var febeMacShell = Components.classes["@mozilla.org/network/file-output-stream;1"]
.createInstance(Components.interfaces.nsIFileOutputStream);
febeMacShell.init(febeMacLaunch, 0x02 | 0x08 | 0x20, 0777, 0); // write, create, truncate
var charset = "UTF-8";
var osBatchFile = Components.classes["@mozilla.org/intl/converter-output-stream;1"]
.createInstance(Components.interfaces.nsIConverterOutputStream);
osBatchFile.init(febeMacShell, charset, 4096, 0x0000);
// Build the batch file
var batchlines = [];
batchlines.push("cd \'"+FEBEdir.path+"\'");
batchlines.push("pwd");
batchlines.push("/bin/sh");
febeNLchar = "\n";
osBatchFile.writeString(batchlines.join(febeNLchar));
osBatchFile.close();
// Change the permissions
var chmodfile = Components.classes["@mozilla.org/file/local;1"]
.createInstance(Components.interfaces.nsILocalFile);
chmodfile.initWithPath("/");
chmodfile.append("bin");
chmodfile.append("chmod");
var process = Components.classes["@mozilla.org/process/util;1"]
.createInstance(Components.interfaces.nsIProcess);
process.init(chmodfile);
var argv = ["0777",febeMacLaunch.path];
process.run(true, argv, argv.length);
// Run the batch file
file.initWithPath("/");
file.append("usr");
file.append("bin")
file.append("open")
var process = Components.classes["@mozilla.org/process/util;1"]
.createInstance(Components.interfaces.nsIProcess);
process.init(file);
/* This is want it to do, but it just don't work ...
Run the batch file that cd's to the intall dir and shells
var argv = ["-a","/Applications/Utilities/Terminal.app","\'"+febeMacLaunch.path+"'"];
*/
// So open a generic terminal windw
var argv = ["/Applications/Utilities/Terminal.app"];
process.run(true, argv, argv.length);
break;
}//switch
return true;
}//febeRunShellInstallDir()
function febeRunShellTmpDir(){
// Open a shell to the tmp dir
febeGetTmpDirectory(true);
if (!febeTmpDir.exists()){
febeTmpDir.create(Components.interfaces.nsIFile.DIRECTORY_TYPE, 0777);
}//if
var file = Components.classes["@mozilla.org/file/local;1"]
.createInstance(Components.interfaces.nsILocalFile);
switch(febePlatform){
case 1:
file.initWithPath("C:");
file.append("windows");
file.append("system32");
file.append("cmd.exe")
var process = Components.classes["@mozilla.org/process/util;1"]
.createInstance(Components.interfaces.nsIProcess);
process.init(file);
var argv = ["/K","cd",febeTmpDir.path];
process.run(true, argv, argv.length);
break;
case 2:
file.initWithPath("/");
file.append("bin");
file.append("sh")
var process = Components.classes["@mozilla.org/process/util;1"]
.createInstance(Components.interfaces.nsIProcess);
process.init(file);
var arg = 'cd "'+febeTmpDir.path+'";/usr/bin/xterm -e sh';
var argv = ["-c",arg];
process.run(true, argv, argv.length);
break;
case 3:
// Create the tmp file to store the batch file
febeGetTmpDirectory(true);
if(!febeTmpDir.exists()){
febeTmpDir.create(Components.interfaces.nsIFile.DIRECTORY_TYPE, 0777);
}//if
// Create a batch file to launch shell
var febeMacLaunch = febeTmpDir.clone();
febeMacLaunch.append("mactmpdir.sh");
if(febeMacLaunch.exists()){febeMacLaunch.remove(true);}
febeMacLaunch.create(Components.interfaces.nsIFile.NORMAL_FILE_TYPE, 0777);
var febeMacShell = Components.classes["@mozilla.org/network/file-output-stream;1"]
.createInstance(Components.interfaces.nsIFileOutputStream);
febeMacShell.init(febeMacLaunch, 0x02 | 0x08 | 0x20, 0777, 0); // write, create, truncate
var charset = "UTF-8";
var osBatchFile = Components.classes["@mozilla.org/intl/converter-output-stream;1"]
.createInstance(Components.interfaces.nsIConverterOutputStream);
osBatchFile.init(febeMacShell, charset, 4096, 0x0000);
// Build the batch file
var batchlines = [];
batchlines.push("cd \'"+febeTmpDir.path+"\'");
batchlines.push("pwd");
batchlines.push("/bin/sh");
febeNLchar = "\n";
osBatchFile.writeString(batchlines.join(febeNLchar));
osBatchFile.close();
// Change the permissions
var chmodfile = Components.classes["@mozilla.org/file/local;1"]
.createInstance(Components.interfaces.nsILocalFile);
chmodfile.initWithPath("/");
chmodfile.append("bin");
chmodfile.append("chmod");
var process = Components.classes["@mozilla.org/process/util;1"]
.createInstance(Components.interfaces.nsIProcess);
process.init(chmodfile);
var argv = ["0777",febeMacLaunch.path];
process.run(true, argv, argv.length);
// Run the batch file
file.initWithPath("/");
file.append("usr");
file.append("bin")
file.append("open")
var process = Components.classes["@mozilla.org/process/util;1"]
.createInstance(Components.interfaces.nsIProcess);
process.init(file);
/* This is want it to do, but it just don't work ...
Run the batch file that cd's to the intall dir and shells
var argv = ["-a","/Applications/Utilities/Terminal.app","\'"+febeMacLaunch.path+"'"];
*/
// So open a generic terminal windw
var argv = ["/Applications/Utilities/Terminal.app"];
process.run(true, argv, argv.length);
break;
}//switch
return true;
}//febeRunShellTmpDir()
function febeCloseButtonEtc(){
// Show close button for Mac OS X users because they don't get buttons for <prefwindow>
if(febePlatform == 3){
document.getElementById("febeMacAcceptBtn").hidden = false;
}//if
// Set text direction
var textdir = document.getElementById("febeTextDir").value;
if(!textdir){textdir = "ltr";}
var prefName = "extensions.febe.orientation";
febePrefs.setCharPref(prefName,textdir);
return true;
}//febeCloseButtonEtc()
//var features = "chrome,titlebar,toolbar,centerscreen,modal,resizable";
//openDialog("chrome://febe/content/febeOptions.xul", "FEBE Options" features);
//febeOptions()
function openPreferences(paneID)
{
var features = "chrome,titlebar,toolbar,centerscreen,resizable";
var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
.getService(Components.interfaces.nsIWindowMediator);
var win = wm.getMostRecentWindow("Browser:Preferences");
if (win) {
win.focus();
if (paneID) {
var pane = win.document.getElementById(paneID);
win.document.documentElement.showPane(pane);
}
}
else
openDialog("chrome://febe/content/febeOptions.xul",
"FEBE Options", features, paneID);
}
//alert("febeOptions.js loaded");